<template>
	<view class="demo-news">
	    <!-- <image src="../../static/img-news.png" class="demo-news-img"></image> -->
		<view class="up-tips up-gnbl">每日新闻播报</view>
	    <uni-list class="ulist_index" v-for="item in list" :key=item.id>
	    	<uni-list-item :title="item.title" :note="item.summary">
			</uni-list-item>	
	    </uni-list>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				message:"NB",
				list:[] 
			}
		},
		created() {
			const Promise1 = new Promise((resolve, reject) => {
			  uni.request({
			    url: `https://lab.isaaclin.cn/nCoV/api/news?page=2&num=10`,
			    success: (res) => {
					this.list = res.data.results
			      console.log(res.data.results);
			      resolve();
			    },
			    fail: (err) => {
			      reject(err);
			    },
			  });
			}).then(()=>{
			    // this.isShow = true;
			}).catch((err)=>{
			  console.log(err)
			})
		}
}	
</script>

<style>
</style>
